#!/usr/bin/python
# -*- coding: UTF-8 -*-

from flask import Flask
from flask import request
from flask import render_template
app = Flask(__name__)


@app.route('/login', methods=['POST'])
def login():
    return "hello %s" % request.form['username']

@app.route('/tlogin', methods=['POST', 'GET'])
def tlogin():
    if request.method == 'GET':
        return "用户名为%s；密码为%s" % (request.args.get('username', ''),request.args.get('password',''))

if __name__ == '__main__':
    app.debug = True # 打开调试模式
    app.run()

